#ifndef SQUARE_H_
#define SQUARE_H_

#include <vector>
#include <iostream>
/*
    struct for representing a square in the grid.
*/
struct Square
{
    bool isWater, isFood,isHill;
    int ant, lastSeen,hillPlayer;
    std::vector<int> deadAnts;
    int tracking; //# of ants tracking this square either for food or enemy.

    Square()
    {
        isWater = isFood = 0;
        ant = -1;
        lastSeen = 0;
	tracking = 0;
	isHill = 0;
	hillPlayer=-1;
    };

    //resets the information for the square except water information
    void reset()
    {
	tracking = 0;
        isFood = 0;
	isHill=0;
        ant = hillPlayer =-1;
        deadAnts.clear();
    };
  
    bool operator==(const Square& other) const {
	if (isWater!= other.isWater)
	    return false;
	if (isFood!=other.isFood)
	    return false;
	if (ant !=other.ant)
	    return false;
	if (lastSeen != other.lastSeen) 
	    return false;
	if (deadAnts !=other.deadAnts)
	    return false;
	if (isHill != other.isHill) 
	    return false;
	if (hillPlayer != other.hillPlayer) 
	    return false;
	return true;
    }
    friend std::ostream& ::operator<<(std::ostream& os,const Square& square);
};
#endif //SQUARE_H_
